<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'update.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<script type="text/javascript" src = "./js/jquery-1.12.4.js"></script> 
	<script type="text/javascript" src = "./js/tiao.js"></script>
  </head>
  
  <body>
    <form action="Goods/updateForm" method="post">
    	<table border = 1 align = "center">
    		<tr align = "center">
    			<td>商品编号:</td>
    			<td><input type="text" name="id" value="${goods.id}"></td>
    		</tr>
    		<tr align = "center">
    			<td>商品名称:</td>
    			<td><input type="text" name="goodsName" value="${goods.goodName}"></td>
    		</tr>
    		<tr align = "center">
    			<td>商品价格:</td>
    			<td><input type="text" name="goodsPrice" value="${goods.goodsPrice}"></td>
    		</tr>
    		<tr align = "center">
    			<td>库存数量:</td>
    			<td><input type="text" name="goodsCount" value="${goods.goodsCount}"></td>
    		</tr>
    		<tr align="center">
					<td>商品区域</td>
					<td>
						<select name="goodsDistrict" id = "se">
						<option value=1 ${goods.goodsDistrict == 1 ? 'selected' : ''}>朝阳</option>
						<option value=2 ${goods.goodsDistrict == 2 ? 'selected' : ''}>海淀</option>
						<option value=3 ${goods.goodsDistrict == 3 ? 'selected' : ''}>丰台</option>
						<option value=4 ${goods.goodsDistrict == 4 ? 'selected' : ''}>西城</option>
						<option value=5 ${goods.goodsDistrict == 5 ? 'selected' : ''}>昌平</option>
						</select>
					</td>
			</tr>
    		<tr align = "center">
    			<td>订单状态:</td>
    			<td>
					<select name="billStatus">
						<option value=0 ${goods.billStatus == 0 ? 'selected' : ''}>待处理</option>
						<option value=1 ${goods.billStatus == 1 ? 'selected' : ''}>处理中</option>
						<option value=2 ${goods.billStatus == 2 ? 'selected' : ''}>已处理</option>
					</select>
				</td>
    		</tr>
    		<tr align = "center">
    			<td align = "center" colspan="2">
	    			<input type="submit"  value = "提交"/>
	    			<input type = "button" class = "button"   value = "返回"/>
    			</td>
    		</tr>
    	</table>
    </form>
  </body>
</html>
